#include "MyPoint.h"
#include<cmath>
MyPoint::MyPoint()
{
    //ctor
    this->x = 0;
    this->y = 0;
}
MyPoint::MyPoint(double myX,double myY)
{

    this->x = myX;
    this->y = myY;
}

MyPoint::~MyPoint()
{
    //dtor
}
void MyPoint::setX(double myX)
{

    this->x = myX;
}
void MyPoint::setY(double myY)
{
    this->y= myY;
}
double MyPoint::getX()
{
    return this->x;
}
double MyPoint::getY()
{
   return this->y;
}
double MyPoint::distance(MyPoint b)
{
    return sqrt(pow(this->getX()- b.getX(),2) + pow(this->getY()- b.getY(),2));

}

